<div class="wrap">
<?php
NavBar::begin([
    'brandLabel' => '我的shop',
    'brandUrl' => Yii::$app->homeUrl,
    'options' => [
        'class' => 'navbar-inverse navbar-fixed-top',
    ],
]);
$menuItems = [
    ['label' => '修改密码', 'url' => ['/site/index']],
    ['label' => 'Home', 'url' => ['/site/index']],

];
$leftItems = [
    ['label' => '订单',
        'url' => ['/site/index'],
        'items' => [
            [
                'label' => '订单',
                'url' => ['/order'],
            ],[
                'label' => '订单日志',
                'url' => ['/order-log'],
            ],[
                'label' => '购物车',
                'url' => ['/cart'],
            ],
        ]
    ],
    ['label' => '商品',
        'url' => ['/site/index'],
        'items' => [
            [

                'label' => '分类',
                'url' => ['/category'],
            ],
            [
                'label' => '商品',
                'url' => ['/product'],
            ],
            [
                'label' => '评价',
                'url' => ['/comment'],
            ],
            [
                'label' => '购买咨询',
                'url' => ['/consultation'],
            ], [
                'label' => '品牌',
                'url' => ['/brand'],
            ], [
                'label' => '搜索记录',
                'url' => ['/search-log'],
            ], [
                'label' => '导入',
                'url' => ['/import'],
            ], [
                'label' => '导出',
                'url' => ['/export'],
            ],
        ],
    ],
    ['label' => '用户',
        'url' => ['/site/index'],
        'items' => [
            [
                'label' => '用户',
                'url' => ['/order'],
            ],
            [
                'label' => '地址',
                'url' => ['/order'],
            ],
            [
                'label' => '收藏',
                'url' => ['/order'],
            ],
            [
                'label' => '积分',
                'url' => ['/order'],
            ], [
                'label' => '优惠券类型',
                'url' => ['/order'],
            ], [
                'label' => '优惠券',
                'url' => ['/order'],
            ],
        ],
    ],
    ['label' => '运营',
        'url' => ['/site/index'],
        'items' => [
            [
                'label' => 'CMS分类',
                'url' => ['/order'],
            ],
            [
                'label' => 'CMS列表页',
                'url' => ['/order'],
            ],
        ],
    ],
    ['label' => '系统',
        'url' => ['/site/index'],
        'items' => [
            [
                'label' => '支付',
                'url' => ['/order'],
            ],
            [
                'label' => '配送',
                'url' => ['/order'],
            ],
            [
                'label' => '角色',
                'url' => ['/order'],
            ],
            [
                'label' => '设置',
                'url' => ['/order'],
            ],
            [
                'label' => '地区',
                'url' => ['/order'],
            ],
        ],
    ],

];
if (Yii::$app->user->isGuest) {
    $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
} else {
    $menuItems[] = '<li>'
        . Html::beginForm(['/site/logout'], 'post')
        . Html::submitButton(
            'Logout (' . Yii::$app->user->identity->username . ')',
            ['class' => 'btn btn-link logout']
        )
        . Html::endForm()
        . '</li>';
}
echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
    'items' => $menuItems,

]);
echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-left'],
    'items' => $leftItems,

]);
NavBar::end();
?>